/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * 京东云jcq接口
 * jcq相关接口
 *
 * OpenAPI spec version: v1
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using JDCloudSDK.Core.Auth;
using JDCloudSDK.Core.Client;
using JDCloudSDK.Core.Http;
using JDCloudSDK.Jcq.Apis;
using JDCloudSDK.Jcq.Model;
using System;
using System.Collections.Generic;
using System.Text;
#if NET40||NET35
#else
using System.Threading.Tasks;
#endif

namespace JDCloudSDK.Jcq.Client
{
    /// <summary>
    ///  京东云jcq接口
    ///  jcq相关接口
    ///  Jcq Api 客户端
    ///</summary>
    public class JcqClient : JdcloudClient
    {

        /// <summary>
        ///  默认私有构造函数
        /// </summary>
        private JcqClient()
        {

        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="environment">sdk 环境配置信息</param>
        public JcqClient(CredentialsProvider credentialsProvider, HttpRequestConfig httpRequestConfig,SDKEnvironment environment)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
            this.environment = environment;
        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="credentialsProvider">认证信息</param>
        public JcqClient(CredentialsProvider credentialsProvider,HttpRequestConfig httpRequestConfig)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        /// 默认构造函数，
        /// 注意如果使用此方法 httpRequestConfig 使用的http 请求 schema 为Https
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        public JcqClient(CredentialsProvider credentialsProvider)
        {
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        ///  版本号 1.2.0
        ///</summary>
        public const string ClientVersion = "1.2.0";

        private const string apiVersion = "v1";
        private const string userAgentPrefix = "JdcloudSdkDotNet";
        private const string defaultEndpoint = "jcq.jdcloud-api.com";
        private const string serviceName = "jcq";
        private const string userAgent = userAgentPrefix + "/" + ClientVersion + " " + serviceName + "/" + apiVersion;


        private SDKEnvironment environment = new SDKEnvironment(defaultEndpoint);
        private CredentialsProvider credentialsProvider;
        private HttpRequestConfig httpRequestConfig;

        /// <summary>
        ///  获取证书信息
        ///</summary>
        public override CredentialsProvider CredentialsProvider   { get { return credentialsProvider; } }

        /// <summary>
        ///  获取http 客户端配置信息
        ///</summary>
        public override HttpRequestConfig HttpRequestConfig { get { return httpRequestConfig; } }

        /// <summary>
        ///  获取sdk环境配置信息
        ///</summary>
        public override SDKEnvironment SDKEnvironment { get { return environment; } }

        /// <summary>
        ///  获取用户自定义浏览器识别字符串
        ///</summary>
        public override string UserAgent { get { return userAgent; } }

        /// <summary>
        ///  获取服务名称
        ///</summary>
        public override string ServiceName { get { return serviceName; } }

        /// <summary>
        ///  获取版本号
        ///</summary>
        public override string Version { get { return apiVersion; } }



#if NET40||NET35
        /// <summary>
        ///  死信队列列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ListDeadLettersResponse ListDeadLetters(ListDeadLettersRequest request) {
            return  new ListDeadLettersExecutor().Client(this).Execute<ListDeadLettersResponse, ListDeadLettersResult, ListDeadLettersRequest>(request);
        }
#else
        /// <summary>
        ///  死信队列列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ListDeadLettersResponse> ListDeadLetters(ListDeadLettersRequest request) {
            return await new ListDeadLettersExecutor().Client(this).Execute<ListDeadLettersResponse, ListDeadLettersResult, ListDeadLettersRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  死信消息数(按照用户或者consumerGroupId)
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDeadLetterNumbersResponse DescribeDeadLetterNumbers(DescribeDeadLetterNumbersRequest request) {
            return  new DescribeDeadLetterNumbersExecutor().Client(this).Execute<DescribeDeadLetterNumbersResponse, DescribeDeadLetterNumbersResult, DescribeDeadLetterNumbersRequest>(request);
        }
#else
        /// <summary>
        ///  死信消息数(按照用户或者consumerGroupId)
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDeadLetterNumbersResponse> DescribeDeadLetterNumbers(DescribeDeadLetterNumbersRequest request) {
            return await new DescribeDeadLetterNumbersExecutor().Client(this).Execute<DescribeDeadLetterNumbersResponse, DescribeDeadLetterNumbersResult, DescribeDeadLetterNumbersRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  清除消息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CleanMessagesResponse CleanMessages(CleanMessagesRequest request) {
            return  new CleanMessagesExecutor().Client(this).Execute<CleanMessagesResponse, CleanMessagesResult, CleanMessagesRequest>(request);
        }
#else
        /// <summary>
        ///  清除消息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CleanMessagesResponse> CleanMessages(CleanMessagesRequest request) {
            return await new CleanMessagesExecutor().Client(this).Execute<CleanMessagesResponse, CleanMessagesResult, CleanMessagesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除单个topic
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteTopicResponse DeleteTopic(DeleteTopicRequest request) {
            return  new DeleteTopicExecutor().Client(this).Execute<DeleteTopicResponse, DeleteTopicResult, DeleteTopicRequest>(request);
        }
#else
        /// <summary>
        ///  删除单个topic
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteTopicResponse> DeleteTopic(DeleteTopicRequest request) {
            return await new DeleteTopicExecutor().Client(this).Execute<DeleteTopicResponse, DeleteTopicResult, DeleteTopicRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  重发死信消息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ResendDeadLettersResponse ResendDeadLetters(ResendDeadLettersRequest request) {
            return  new ResendDeadLettersExecutor().Client(this).Execute<ResendDeadLettersResponse, ResendDeadLettersResult, ResendDeadLettersRequest>(request);
        }
#else
        /// <summary>
        ///  重发死信消息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ResendDeadLettersResponse> ResendDeadLetters(ResendDeadLettersRequest request) {
            return await new ResendDeadLettersExecutor().Client(this).Execute<ResendDeadLettersResponse, ResendDeadLettersResult, ResendDeadLettersRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查看接入点接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAccessPointResponse DescribeAccessPoint(DescribeAccessPointRequest request) {
            return  new DescribeAccessPointExecutor().Client(this).Execute<DescribeAccessPointResponse, DescribeAccessPointResult, DescribeAccessPointRequest>(request);
        }
#else
        /// <summary>
        ///  查看接入点接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAccessPointResponse> DescribeAccessPoint(DescribeAccessPointRequest request) {
            return await new DescribeAccessPointExecutor().Client(this).Execute<DescribeAccessPointResponse, DescribeAccessPointResult, DescribeAccessPointRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询topic列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeTopicsResponse DescribeTopics(DescribeTopicsRequest request) {
            return  new DescribeTopicsExecutor().Client(this).Execute<DescribeTopicsResponse, DescribeTopicsResult, DescribeTopicsRequest>(request);
        }
#else
        /// <summary>
        ///  查询topic列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeTopicsResponse> DescribeTopics(DescribeTopicsRequest request) {
            return await new DescribeTopicsExecutor().Client(this).Execute<DescribeTopicsResponse, DescribeTopicsResult, DescribeTopicsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除当前topic对目标用户授权的权限
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public RemovePermissionResponse RemovePermission(RemovePermissionRequest request) {
            return  new RemovePermissionExecutor().Client(this).Execute<RemovePermissionResponse, RemovePermissionResult, RemovePermissionRequest>(request);
        }
#else
        /// <summary>
        ///  删除当前topic对目标用户授权的权限
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<RemovePermissionResponse> RemovePermission(RemovePermissionRequest request) {
            return await new RemovePermissionExecutor().Client(this).Execute<RemovePermissionResponse, RemovePermissionResult, RemovePermissionRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  重置消费位
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ResetConsumeOffsetResponse ResetConsumeOffset(ResetConsumeOffsetRequest request) {
            return  new ResetConsumeOffsetExecutor().Client(this).Execute<ResetConsumeOffsetResponse, ResetConsumeOffsetResult, ResetConsumeOffsetRequest>(request);
        }
#else
        /// <summary>
        ///  重置消费位
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ResetConsumeOffsetResponse> ResetConsumeOffset(ResetConsumeOffsetRequest request) {
            return await new ResetConsumeOffsetExecutor().Client(this).Execute<ResetConsumeOffsetResponse, ResetConsumeOffsetResult, ResetConsumeOffsetRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除死信消息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteDeadLettersResponse DeleteDeadLetters(DeleteDeadLettersRequest request) {
            return  new DeleteDeadLettersExecutor().Client(this).Execute<DeleteDeadLettersResponse, DeleteDeadLettersResult, DeleteDeadLettersRequest>(request);
        }
#else
        /// <summary>
        ///  删除死信消息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteDeadLettersResponse> DeleteDeadLetters(DeleteDeadLettersRequest request) {
            return await new DeleteDeadLettersExecutor().Client(this).Execute<DeleteDeadLettersResponse, DeleteDeadLettersResult, DeleteDeadLettersRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建一个指定名称的topic
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateTopicResponse CreateTopic(CreateTopicRequest request) {
            return  new CreateTopicExecutor().Client(this).Execute<CreateTopicResponse, CreateTopicResult, CreateTopicRequest>(request);
        }
#else
        /// <summary>
        ///  创建一个指定名称的topic
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateTopicResponse> CreateTopic(CreateTopicRequest request) {
            return await new CreateTopicExecutor().Client(this).Execute<CreateTopicResponse, CreateTopicResult, CreateTopicRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建订阅
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateSubscriptionResponse CreateSubscription(CreateSubscriptionRequest request) {
            return  new CreateSubscriptionExecutor().Client(this).Execute<CreateSubscriptionResponse, CreateSubscriptionResult, CreateSubscriptionRequest>(request);
        }
#else
        /// <summary>
        ///  创建订阅
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateSubscriptionResponse> CreateSubscription(CreateSubscriptionRequest request) {
            return await new CreateSubscriptionExecutor().Client(this).Execute<CreateSubscriptionResponse, CreateSubscriptionResult, CreateSubscriptionRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询消息轨迹
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeMessageTraceResponse DescribeMessageTrace(DescribeMessageTraceRequest request) {
            return  new DescribeMessageTraceExecutor().Client(this).Execute<DescribeMessageTraceResponse, DescribeMessageTraceResult, DescribeMessageTraceRequest>(request);
        }
#else
        /// <summary>
        ///  查询消息轨迹
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeMessageTraceResponse> DescribeMessageTrace(DescribeMessageTraceRequest request) {
            return await new DescribeMessageTraceExecutor().Client(this).Execute<DescribeMessageTraceResponse, DescribeMessageTraceResult, DescribeMessageTraceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  consumerGroupId列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeConsumerGroupIdsResponse DescribeConsumerGroupIds(DescribeConsumerGroupIdsRequest request) {
            return  new DescribeConsumerGroupIdsExecutor().Client(this).Execute<DescribeConsumerGroupIdsResponse, DescribeConsumerGroupIdsResult, DescribeConsumerGroupIdsRequest>(request);
        }
#else
        /// <summary>
        ///  consumerGroupId列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeConsumerGroupIdsResponse> DescribeConsumerGroupIds(DescribeConsumerGroupIdsRequest request) {
            return await new DescribeConsumerGroupIdsExecutor().Client(this).Execute<DescribeConsumerGroupIdsResponse, DescribeConsumerGroupIdsResult, DescribeConsumerGroupIdsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改订阅
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifySubscriptionAttributeResponse ModifySubscriptionAttribute(ModifySubscriptionAttributeRequest request) {
            return  new ModifySubscriptionAttributeExecutor().Client(this).Execute<ModifySubscriptionAttributeResponse, ModifySubscriptionAttributeResult, ModifySubscriptionAttributeRequest>(request);
        }
#else
        /// <summary>
        ///  修改订阅
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifySubscriptionAttributeResponse> ModifySubscriptionAttribute(ModifySubscriptionAttributeRequest request) {
            return await new ModifySubscriptionAttributeExecutor().Client(this).Execute<ModifySubscriptionAttributeResponse, ModifySubscriptionAttributeResult, ModifySubscriptionAttributeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  对当前topic授予目标用户特定权限
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddPermissionResponse AddPermission(AddPermissionRequest request) {
            return  new AddPermissionExecutor().Client(this).Execute<AddPermissionResponse, AddPermissionResult, AddPermissionRequest>(request);
        }
#else
        /// <summary>
        ///  对当前topic授予目标用户特定权限
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddPermissionResponse> AddPermission(AddPermissionRequest request) {
            return await new AddPermissionExecutor().Client(this).Execute<AddPermissionResponse, AddPermissionResult, AddPermissionRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询订阅详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSubscriptionResponse DescribeSubscription(DescribeSubscriptionRequest request) {
            return  new DescribeSubscriptionExecutor().Client(this).Execute<DescribeSubscriptionResponse, DescribeSubscriptionResult, DescribeSubscriptionRequest>(request);
        }
#else
        /// <summary>
        ///  查询订阅详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSubscriptionResponse> DescribeSubscription(DescribeSubscriptionRequest request) {
            return await new DescribeSubscriptionExecutor().Client(this).Execute<DescribeSubscriptionResponse, DescribeSubscriptionResult, DescribeSubscriptionRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询topic详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeTopicResponse DescribeTopic(DescribeTopicRequest request) {
            return  new DescribeTopicExecutor().Client(this).Execute<DescribeTopicResponse, DescribeTopicResult, DescribeTopicRequest>(request);
        }
#else
        /// <summary>
        ///  查询topic详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeTopicResponse> DescribeTopic(DescribeTopicRequest request) {
            return await new DescribeTopicExecutor().Client(this).Execute<DescribeTopicResponse, DescribeTopicResult, DescribeTopicRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  消息列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeMessagesResponse DescribeMessages(DescribeMessagesRequest request) {
            return  new DescribeMessagesExecutor().Client(this).Execute<DescribeMessagesResponse, DescribeMessagesResult, DescribeMessagesRequest>(request);
        }
#else
        /// <summary>
        ///  消息列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeMessagesResponse> DescribeMessages(DescribeMessagesRequest request) {
            return await new DescribeMessagesExecutor().Client(this).Execute<DescribeMessagesResponse, DescribeMessagesResult, DescribeMessagesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  订阅列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSubscriptionsResponse DescribeSubscriptions(DescribeSubscriptionsRequest request) {
            return  new DescribeSubscriptionsExecutor().Client(this).Execute<DescribeSubscriptionsResponse, DescribeSubscriptionsResult, DescribeSubscriptionsRequest>(request);
        }
#else
        /// <summary>
        ///  订阅列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSubscriptionsResponse> DescribeSubscriptions(DescribeSubscriptionsRequest request) {
            return await new DescribeSubscriptionsExecutor().Client(this).Execute<DescribeSubscriptionsResponse, DescribeSubscriptionsResult, DescribeSubscriptionsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询message详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeMessageResponse DescribeMessage(DescribeMessageRequest request) {
            return  new DescribeMessageExecutor().Client(this).Execute<DescribeMessageResponse, DescribeMessageResult, DescribeMessageRequest>(request);
        }
#else
        /// <summary>
        ///  查询message详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeMessageResponse> DescribeMessage(DescribeMessageRequest request) {
            return await new DescribeMessageExecutor().Client(this).Execute<DescribeMessageResponse, DescribeMessageResult, DescribeMessageRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  根据businessId查询消息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeMessagesByBusinessIdResponse DescribeMessagesByBusinessId(DescribeMessagesByBusinessIdRequest request) {
            return  new DescribeMessagesByBusinessIdExecutor().Client(this).Execute<DescribeMessagesByBusinessIdResponse, DescribeMessagesByBusinessIdResult, DescribeMessagesByBusinessIdRequest>(request);
        }
#else
        /// <summary>
        ///  根据businessId查询消息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeMessagesByBusinessIdResponse> DescribeMessagesByBusinessId(DescribeMessagesByBusinessIdRequest request) {
            return await new DescribeMessagesByBusinessIdExecutor().Client(this).Execute<DescribeMessagesByBusinessIdResponse, DescribeMessagesByBusinessIdResult, DescribeMessagesByBusinessIdRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查看当前topic授予了哪些用户哪些权限
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribePermissionResponse DescribePermission(DescribePermissionRequest request) {
            return  new DescribePermissionExecutor().Client(this).Execute<DescribePermissionResponse, DescribePermissionResult, DescribePermissionRequest>(request);
        }
#else
        /// <summary>
        ///  查看当前topic授予了哪些用户哪些权限
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribePermissionResponse> DescribePermission(DescribePermissionRequest request) {
            return await new DescribePermissionExecutor().Client(this).Execute<DescribePermissionResponse, DescribePermissionResult, DescribePermissionRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  死信消息数
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDeadLetterNumbersWithTopicResponse DescribeDeadLetterNumbersWithTopic(DescribeDeadLetterNumbersWithTopicRequest request) {
            return  new DescribeDeadLetterNumbersWithTopicExecutor().Client(this).Execute<DescribeDeadLetterNumbersWithTopicResponse, DescribeDeadLetterNumbersWithTopicResult, DescribeDeadLetterNumbersWithTopicRequest>(request);
        }
#else
        /// <summary>
        ///  死信消息数
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDeadLetterNumbersWithTopicResponse> DescribeDeadLetterNumbersWithTopic(DescribeDeadLetterNumbersWithTopicRequest request) {
            return await new DescribeDeadLetterNumbersWithTopicExecutor().Client(this).Execute<DescribeDeadLetterNumbersWithTopicResponse, DescribeDeadLetterNumbersWithTopicResult, DescribeDeadLetterNumbersWithTopicRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除订阅
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteSubscriptionResponse DeleteSubscription(DeleteSubscriptionRequest request) {
            return  new DeleteSubscriptionExecutor().Client(this).Execute<DeleteSubscriptionResponse, DeleteSubscriptionResult, DeleteSubscriptionRequest>(request);
        }
#else
        /// <summary>
        ///  删除订阅
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteSubscriptionResponse> DeleteSubscription(DeleteSubscriptionRequest request) {
            return await new DeleteSubscriptionExecutor().Client(this).Execute<DeleteSubscriptionResponse, DeleteSubscriptionResult, DeleteSubscriptionRequest>(request).ConfigureAwait(false);
        }
#endif

            /// <summary>
            ///  默认JcqClient 构造器 接口
            ///</summary>
            public interface Builder
            {

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>jcqClient 构造器</returns>
                Builder CredentialsProvider(CredentialsProvider provider);

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>jcqClient 构造器</returns>
                Builder Environment(Core.Client.SDKEnvironment environment);

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>jcqClient 构造器</returns>
                Builder HttpRequestConfig(HttpRequestConfig config);

                /// <summary>
                ///  构造JcqClient 对象
                ///</summary>
                JcqClient Build();
            }

            /// <summary>
            ///  默认JcqClient 构造器
            ///</summary>
            public class DefaultBuilder : Builder
            {
                /// <summary>
                ///  JcqClient service client
                /// </summary>
                private  JcqClient jcqClient;

                /// <summary>
                ///  默认JcqClient 构造器构造对象
                ///</summary>
                public DefaultBuilder()
                {
                    jcqClient = new JcqClient();
                }

                /// <summary>
                ///  构造JcqClient 对象
                ///</summary>
                public JcqClient Build()
                {
                    if (jcqClient.CredentialsProvider == null)
                    {
                        //if credentialsProvider not set, try load jdcloud global default  credentials provider
                        jcqClient.credentialsProvider = JdCloud.DefaultInstance.GetCredentialsProvider();
                        if (jcqClient.credentialsProvider == null)
                        {
                            throw new ArgumentNullException("JcqClient build error: jdcloud credentials provider not set");
                        }
                    }
                    if (jcqClient.HttpRequestConfig == null)
                    {
                        jcqClient.httpRequestConfig = JdCloud.DefaultInstance.GetHttpRequestConfig();
                        if (jcqClient.httpRequestConfig == null)
                        {
                        throw new ArgumentNullException("JcqClient build error: http request config not set");
                        }
                    }
                    return jcqClient;
                }

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>jcqClient 构造器</returns>
                public Builder CredentialsProvider(CredentialsProvider provider)
                {
                    jcqClient.credentialsProvider = provider;
                    return this;
                }

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>jcqClient 构造器</returns>
                public Builder Environment(SDKEnvironment environment)
                {
                    jcqClient.environment = environment;
                    return this;
                }

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>jcqClient 构造器</returns>
                public Builder HttpRequestConfig(HttpRequestConfig config)
                {
                    jcqClient.httpRequestConfig = config;
                    return this;
                }
            }
    }
}
